package com.cm.caseManagement.pojo.entity;
import com.cm.caseManagement.annotation.Excel;
import com.cm.caseManagement.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 案件对象 cm_case
 *
 * @author ruoyi
 * @date 2025-10-05
 */
public class CmCase extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 案件id */
    private Long id;

    /** 外部唯一id */
    @Excel(name = "外部唯一id")
    private String publicId;

    /** 案件批次id */
    @Excel(name = "案件批次id")
    private Long caseBatchId;

    /** 委托日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "委托日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date entrustDate;

    /** 债务人 */
    @Excel(name = "债务人")
    private String debtorName;

    /** 贷款种类id */
    @Excel(name = "贷款种类id")
    private Long loanTypeId;

    /** 委案本金 */
    @Excel(name = "委案本金")
    private BigDecimal principalAmount;

    /** 贷款到期日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "贷款到期日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date loanDueDate;

    /** 合同名称 */
    @Excel(name = "合同名称")
    private String contractName;

    /** 案件阶段 */
    @Excel(name = "案件阶段")
    private String caseStage;

    /** 案件节点 */
    @Excel(name = "案件节点")
    private String caseNode;

    /** 节点截止日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "节点截止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date nodeDeadline;

    /** 案件最新文书 */
    @Excel(name = "案件最新文书")
    private String latestDocument;

    /** 预警状态：0正常，1临期，2超期 */
    @Excel(name = "预警状态：0正常，1临期，2超期")
    private Long warningStatus;

    /** 诉讼时效 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "诉讼时效", width = 30, dateFormat = "yyyy-MM-dd")
    private Date limitationPeriod;

    /** 贷款编号 */
    @Excel(name = "贷款编号")
    private String loanNo;

    /** 委案律师费金额 */
    @Excel(name = "委案律师费金额")
    private BigDecimal basicAttorneyFee;

    /** 基础律师费金额（字段名重复，已重命名） */
    @Excel(name = "基础律师费金额", readConverterExp = "字=段名重复，已重命名")
    private BigDecimal basicAttorneyFee2;

    /** 基础律师费到账日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "基础律师费到账日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date basicFeePaymentDate;

    /** 风险律师费金额 */
    @Excel(name = "风险律师费金额")
    private BigDecimal riskAttorneyFee;

    /** 风险律师费到账日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "风险律师费到账日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date riskFeePaymentDate;

    /** 保证金缴纳金额 */
    @Excel(name = "保证金缴纳金额")
    private BigDecimal depositAmount;

    /** 保证金缴纳日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保证金缴纳日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date depositPaymentDate;

    /** 保证金退回金额 */
    @Excel(name = "保证金退回金额")
    private BigDecimal depositRefundAmount;

    /** 保证金退回日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保证金退回日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date depositRefundDate;

    /** 保证金结算状态：0在办不可结算,1在办可结算未报，2在办可结算已报，3已办结已结算 */
    @Excel(name = "保证金结算状态：0在办不可结算,1在办可结算未报，2在办可结算已报，3已办结已结算")
    private Long depositSettlementStatus;

    /** 违约金金额 */
    @Excel(name = "违约金金额")
    private BigDecimal penaltyAmount;

    /** 承接律师id */
    @Excel(name = "承接律师id")
    private Long granteeId;

    /** 下次预警日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下次预警日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date nextWarningDate;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setPublicId(String publicId)
    {
        this.publicId = publicId;
    }

    public String getPublicId()
    {
        return publicId;
    }

    public void setCaseBatchId(Long caseBatchId)
    {
        this.caseBatchId = caseBatchId;
    }

    public Long getCaseBatchId()
    {
        return caseBatchId;
    }

    public void setEntrustDate(Date entrustDate)
    {
        this.entrustDate = entrustDate;
    }

    public Date getEntrustDate()
    {
        return entrustDate;
    }

    public void setDebtorName(String debtorName)
    {
        this.debtorName = debtorName;
    }

    public String getDebtorName()
    {
        return debtorName;
    }

    public void setLoanTypeId(Long loanTypeId)
    {
        this.loanTypeId = loanTypeId;
    }

    public Long getLoanTypeId()
    {
        return loanTypeId;
    }

    public void setPrincipalAmount(BigDecimal principalAmount)
    {
        this.principalAmount = principalAmount;
    }

    public BigDecimal getPrincipalAmount()
    {
        return principalAmount;
    }

    public void setLoanDueDate(Date loanDueDate)
    {
        this.loanDueDate = loanDueDate;
    }

    public Date getLoanDueDate()
    {
        return loanDueDate;
    }

    public void setContractName(String contractName)
    {
        this.contractName = contractName;
    }

    public String getContractName()
    {
        return contractName;
    }

    public void setCaseStage(String caseStage)
    {
        this.caseStage = caseStage;
    }

    public String getCaseStage()
    {
        return caseStage;
    }

    public void setCaseNode(String caseNode)
    {
        this.caseNode = caseNode;
    }

    public String getCaseNode()
    {
        return caseNode;
    }

    public void setNodeDeadline(Date nodeDeadline)
    {
        this.nodeDeadline = nodeDeadline;
    }

    public Date getNodeDeadline()
    {
        return nodeDeadline;
    }

    public void setLatestDocument(String latestDocument)
    {
        this.latestDocument = latestDocument;
    }

    public String getLatestDocument()
    {
        return latestDocument;
    }

    public void setWarningStatus(Long warningStatus)
    {
        this.warningStatus = warningStatus;
    }

    public Long getWarningStatus()
    {
        return warningStatus;
    }

    public void setLimitationPeriod(Date limitationPeriod)
    {
        this.limitationPeriod = limitationPeriod;
    }

    public Date getLimitationPeriod()
    {
        return limitationPeriod;
    }

    public void setLoanNo(String loanNo)
    {
        this.loanNo = loanNo;
    }

    public String getLoanNo()
    {
        return loanNo;
    }

    public void setBasicAttorneyFee(BigDecimal basicAttorneyFee)
    {
        this.basicAttorneyFee = basicAttorneyFee;
    }

    public BigDecimal getBasicAttorneyFee()
    {
        return basicAttorneyFee;
    }

    public void setBasicAttorneyFee2(BigDecimal basicAttorneyFee2)
    {
        this.basicAttorneyFee2 = basicAttorneyFee2;
    }

    public BigDecimal getBasicAttorneyFee2()
    {
        return basicAttorneyFee2;
    }

    public void setBasicFeePaymentDate(Date basicFeePaymentDate)
    {
        this.basicFeePaymentDate = basicFeePaymentDate;
    }

    public Date getBasicFeePaymentDate()
    {
        return basicFeePaymentDate;
    }

    public void setRiskAttorneyFee(BigDecimal riskAttorneyFee)
    {
        this.riskAttorneyFee = riskAttorneyFee;
    }

    public BigDecimal getRiskAttorneyFee()
    {
        return riskAttorneyFee;
    }

    public void setRiskFeePaymentDate(Date riskFeePaymentDate)
    {
        this.riskFeePaymentDate = riskFeePaymentDate;
    }

    public Date getRiskFeePaymentDate()
    {
        return riskFeePaymentDate;
    }

    public void setDepositAmount(BigDecimal depositAmount)
    {
        this.depositAmount = depositAmount;
    }

    public BigDecimal getDepositAmount()
    {
        return depositAmount;
    }

    public void setDepositPaymentDate(Date depositPaymentDate)
    {
        this.depositPaymentDate = depositPaymentDate;
    }

    public Date getDepositPaymentDate()
    {
        return depositPaymentDate;
    }

    public void setDepositRefundAmount(BigDecimal depositRefundAmount)
    {
        this.depositRefundAmount = depositRefundAmount;
    }

    public BigDecimal getDepositRefundAmount()
    {
        return depositRefundAmount;
    }

    public void setDepositRefundDate(Date depositRefundDate)
    {
        this.depositRefundDate = depositRefundDate;
    }

    public Date getDepositRefundDate()
    {
        return depositRefundDate;
    }

    public void setDepositSettlementStatus(Long depositSettlementStatus)
    {
        this.depositSettlementStatus = depositSettlementStatus;
    }

    public Long getDepositSettlementStatus()
    {
        return depositSettlementStatus;
    }

    public void setPenaltyAmount(BigDecimal penaltyAmount)
    {
        this.penaltyAmount = penaltyAmount;
    }

    public BigDecimal getPenaltyAmount()
    {
        return penaltyAmount;
    }

    public void setGranteeId(Long granteeId)
    {
        this.granteeId = granteeId;
    }

    public Long getGranteeId()
    {
        return granteeId;
    }

    public void setNextWarningDate(Date nextWarningDate)
    {
        this.nextWarningDate = nextWarningDate;
    }

    public Date getNextWarningDate()
    {
        return nextWarningDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("publicId", getPublicId())
            .append("caseBatchId", getCaseBatchId())
            .append("entrustDate", getEntrustDate())
            .append("debtorName", getDebtorName())
            .append("loanTypeId", getLoanTypeId())
            .append("principalAmount", getPrincipalAmount())
            .append("loanDueDate", getLoanDueDate())
            .append("contractName", getContractName())
            .append("caseStage", getCaseStage())
            .append("caseNode", getCaseNode())
            .append("nodeDeadline", getNodeDeadline())
            .append("latestDocument", getLatestDocument())
            .append("warningStatus", getWarningStatus())
            .append("limitationPeriod", getLimitationPeriod())
            .append("loanNo", getLoanNo())
            .append("basicAttorneyFee", getBasicAttorneyFee())
            .append("basicAttorneyFee2", getBasicAttorneyFee2())
            .append("basicFeePaymentDate", getBasicFeePaymentDate())
            .append("riskAttorneyFee", getRiskAttorneyFee())
            .append("riskFeePaymentDate", getRiskFeePaymentDate())
            .append("depositAmount", getDepositAmount())
            .append("depositPaymentDate", getDepositPaymentDate())
            .append("depositRefundAmount", getDepositRefundAmount())
            .append("depositRefundDate", getDepositRefundDate())
            .append("depositSettlementStatus", getDepositSettlementStatus())
            .append("penaltyAmount", getPenaltyAmount())
            .append("granteeId", getGranteeId())
            .append("nextWarningDate", getNextWarningDate())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
